# $Id: PKGBUILD 41765 2011-03-08 20:18:32Z spupykin $
# Maintainer: Florian Pritz <bluewind@xinu.at>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Francois Charette <firmicus@gmx.net>

pkgname=perl-mail-dkim
pkgver=0.53
pkgrel=2
pkgdesc='Signs/verifies Internet mail with DKIM/DomainKey signatures'
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=('perl-crypt-openssl-rsa>=0.24' perl-mailtools perl-net-dns
         perl-net-dns-resolver-mock perl-yaml-libyaml)
checkdepends=(perl-test-requiresinternet)
url=https://metacpan.org/release/Mail-DKIM
source=("http://search.cpan.org/CPAN/authors/id/M/MB/MBRADSHAW/Mail-DKIM-$pkgver.tar.gz")
md5sums=(7f957f68c009e84544993a136d5ded34)
sha512sums=(d670dafa3408338f9b59629dbd6038e087e1c6a51e9b5dd49fc459110a40d434b68ab75d6b7e065eb261c1bb13c273542a2d3d8034ee32c33b06c0b225f0a7b3)
_ddir="Mail-DKIM-$pkgver"

build()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  unset PERL5LIB PERL_MM_OPT
  /usr/bin/perl Makefile.PL
  make
)

check()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1
  unset PERL5LIB

  # Test fails due to dns errors in chroot. Weird, but works on the host itself...
  # possibly fixed in 0.53 so comment for now
  #rm t/policy.t

  make test
)

package()
(
  cd "$srcdir/$_ddir"
  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
)

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
